package com.pro.service.imple;

import com.pro.dao.AdvertisementMapper;
import com.pro.entity.JsCarousel;
import com.pro.service.AdvertisementService;
import com.pro.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @ClassName AdvertisementServiceImple
 * @Author 谭金诚
 * @Date 2021/11/7
 */
@Service
public class AdvertisementServiceImple implements AdvertisementService {

    @Autowired
    private AdvertisementMapper mapper;

    @Override
    public List<JsCarousel> getAdvertisement(JsCarousel jsCarousel) {
        List<JsCarousel> advertisement = mapper.getAdvertisement(jsCarousel);
        return advertisement;
    }

    @Override
    public boolean delAdvertisement(Integer carouselId) {
        boolean b = mapper.delAdvertisement(carouselId);
        return b;
    }

    @Override
    public boolean upAdvertisement(JsCarousel jsCarousel) {
        boolean b = mapper.upAdvertisement(jsCarousel);
        return b;
    }

    @Override
    public boolean addAdvertisement(JsCarousel jsCarousel) {
        boolean b = mapper.addAdvertisement(jsCarousel);
        return b;
    }

    @Override
    public boolean updateAdvertisement(Integer carouselId) {
        boolean b = mapper.updateAdvertisement(carouselId);
        return b;
    }
}
